<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>菜单编辑</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<link rel="STYLESHEET" type="text/css" href="<%=basePath%>/dtree/dhtmlxtree.css">
	<script  src="<%=basePath%>/dtree/dhtmlxcommon.js"></script>
	<script  src="<%=basePath%>/dtree/dhtmlxtree.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btnSubmit1").click(function() {
				var funId = tree.getAllCheckedBranches();//.getAllChecked();前边是将所有选中节点得到，包括父节点，后边一个只得到选中的节点，不包括其父节点（当父节点下有很多子节点，而子节点只选中了一部分）
				if(funId==""){
					alert('请选择权限！');
					return false;
				}
				$("#funIds").val(funId);
			});
		});
	</script>
  </head>
  
  <body>
	<div  class="body-box">
		<div class="map">
			<div class="map_con">
				您当前的位置：系统管理 &gt; 角色管理 &gt; 角色添加
			</div>
			
		</div>
		<div id="container">
			<form action="<%=basePath%>/admin/sys_roleSave.action" method="post" name="form1">
		    	<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="info_table">
					<tr>
						<td colspan="4" class="title_li">角色添加</td>
					</tr>
					<tr>
						<td width="15%" class="title_td">角色名称：</td>
						<td><input type="text" name="roleName" class="info_input" value="" id="bit1"/><SPAN class="note4">*</SPAN></td>
					</tr>
					<tr>
						<td class="title_td">说明：</td>
						<td><textarea rows="5" cols="60" name="roleRemark"></textarea> </td>
					</tr>
					<tr>
						<td colspan="4" align="center">
							<center>
							<input type="submit" name="btntj" class="link_input" id="btnSubmit1" value="提 交">
							<input type="reset" name="btnset" class="link_input" id="btnset" value="重 置">
							<input type="button" name="btn1" class="link_input" id="btnset1" value="返 回" onclick="window.location.href='<%=basePath%>/admin/sys_roleList.action'">
							</center>
						</td>
					</tr>
				</table>
				<input id="funIds" type="hidden" name="funIds" value=""/>
			</form>
		    <fieldset>
			    <legend>权限选择</legend>
			    <table border="0" cellspacing="0" cellpadding="0"  width="80%" style="float:left; margin-top:10px; margin-left:15px;" >
			    	<tr>
			    		<td width="100%" id="treeboxbox_tree">
			    			权限列表
							<script>									
								tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
								tree.setSkin('dhx_skyblue');
								tree.setImagePath("<%=basePath%>/dtree/imgs/csh_winstyle/");
								tree.enableCheckBoxes(1);
								tree.enableThreeStateCheckboxes(true);
								tree.loadXML("<%=basePath%>/dtree/fun_tree.xml");
							</script>
			    		</td>			    		
			    	</tr>
			    </table>
			</fieldset>
		</div>
	</div>
  </body>
</html>
